<!DOCTYPE HTML>
<html lang="en-US">
<head>
	
	
	
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php
			if(isset($title_layout)) {
				echo $title_layout;
			}else {
				echo 'Nodo Appstore';
			}
		?>
	</title>
	<?php
		echo $this->Html->meta('icon');

		echo $this->Html->css(array('slider/themes/carbono/jquery.slider', 'front-end/style-appstore', 'fonts', '../font-awesome/css/font-awesome.min'));
		echo $this->Html->script(array('front-end/jquery.min', 'front-end/jquery.slider.min', 'front-end/tabs_old'));
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
	?>
	<!--[if IE 6]>
	<?php echo $this->Html->css('slider/themes/carbono/jquery.slider.ie6'); ?>
	<![endif]-->
	<script type="text/javascript">
		jQuery(document).ready(function($) {
			$(".slider").slideshow({
				width      : 1024,
				height     : 390,
				transition : ['barLeft', 'barRight']
			});
		});
	</script>
</head>
<body>
	<div id="top-head">
		<div id="head-login">
			
			<ul>
				<?php if(empty($logged_in)): ?>
					<li><?php echo $this->Html->link('Đăng nhập', '/login'); ?></li>
					<li><?php echo $this->Html->link('Đăng ký', '/register'); ?></li>
				<?php else : ?>
					<li> <?php echo $this->Html->link($logged_in['username'], '/thong-tin-tai-khoan/' . $logged_in['id'] . '-' . $logged_in['alias']); ?></li>
					<li><?php echo $this->Html->link('Thoát', '/logout'); ?></li>
				<?php endif; ?>
			</ul>
		</div>
	</div>
	
	<div id="container">
	
		<header>
			<?php echo $this->Html->link($this->Html->image('style-appstore/logo.png'), DOMAIN_ROOT, array('id' => 'logo', 'escape' => false));?>
			<div id="header-right">
				<div id="top-right">
					<?php if(empty($logged_in)): ?>
						<p>Bạn có thể <?php echo $this->Html->link('Đăng ký', '/register'); ?> hoặc <?php echo $this->Html->link('Đăng nhập', '/login'); ?></p>
						<?php else : ?>
						<p style="width: 215px;"></p>
					<?php endif; ?>
					<div id="search">
						<?php
							echo $this->Form->create('Game', array('action' => 'search', 'inputDefaults' => array('label' => false, 'div' => false))); 
							echo $this->Form->input('keyword', array('id' => 'txt-search', 'placeholder' => 'Nhập từ khóa và nhấn tìm kiếm...'));
							echo $this->Form->submit('Tìm kiếm', array('class' => 'search'));
							echo $this->Form->end();
						?>
					</div>
				</div>
				
				<?php echo $this->element('menu'); ?>
			</div>
		</header>
		

		<?php echo $this->fetch('content'); ?>
		<div style="clear: both"></div>
		<footer>
			<div id="footer-top">
				<div class="info">
					<p>Liên hệ</p>
					<ul>
						<li id="address">19 Nguyễn Trãi - Thanh Xuân - Hà Nội</li>
						<li id="tel">046 293 2083</li>
						<li id="email">sup.nodogame@gmail.com</li>
					</ul>
				</div>
				
				<div class="info">
					<p>Thông tin</p>
					<ul>
						<li class="aboutus"><a href="#">Về chúng tôi</a></li>
						<li class="sercurity"><a href="#">Chính sách bảo mật</a></li>
						<li class="abuse"><a href="#">Điều khoản sử dụng</a></li>
					</ul>
				</div>
				
				<div class="info">
					<p>Tài khoản</p>
					<ul>
						<li class="registsite"><a href="#">Đăng ký</a></li>
						<li class="logsite"><a href="#">Đăng nhập</a></li>
						<li class="gamedown"><a href="#">Game đã download</a></li>
					</ul>
				</div>
				
			</div>
			<div style="clear: both"></div>
			
		</footer>
	</div>
	<div id="footer-bottom">
		<div id="copyright">
			<p>Copyright 2013 by nodo.vn</p>
			<div id="social-network">
				<a href="#" class="facebook">Facebook</a>
				<a href="#" class="twitter">Twitter</a>
				<a href="#" class="google">Google</a>
			</div>
		</div>
	</div>
</body>
</html>